﻿using MESBaseis.Domain.BaseEntities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MESBaseis.Domain.ZSH
{
    /// <summary>
    /// 工序分类表
    /// </summary>
    public class ProcessCategory : BaseModel
    {
        /// <summary>
        /// 工序分类编号
        /// </summary>
        [Required]
        [StringLength(50)]
        public string ProcessCategoryNumber { get; set; } = string.Empty;

        /// <summary>
        /// 工序分类名称
        /// </summary>
        [Required]
        [StringLength(100)]
        public string ProcessCategoryName { get; set; } = string.Empty;

        /// <summary>
        /// 排序
        /// </summary>
        public int SortOrder { get; set; } = 0;

        /// <summary>
        /// 状态 (启用/禁用)
        /// </summary>
        public bool IsActive { get; set; } = true;

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string? Remarks { get; set; }

        // 导航属性
        /// <summary>
        /// 该分类下的工序集合
        /// </summary>
        public virtual ICollection<Process> Processes { get; set; } = new List<Process>();
    }
}
